feat: Adopt the flagsmith entrypoint#7901
Conversation
Replace the bespoke startup sequencing in run-docker.sh with the composite verbs provided by the flagsmith-common `flagsmith` entrypoint: - run-docker.sh becomes a thin `exec flagsmith "$@"` shim, kept for callers that reference the script path or its verbs directly. - The image ENTRYPOINT is now `flagsmith`; the APPLICATION_LOGGERS default the shell script used to set moves to a Dockerfile ENV. - Startup verbs are driven by new settings built from the configured databases (FLAGSMITH_MIGRATE_DATABASES, FLAGSMITH_WAIT_FOR_MIGRATIONS_DATABASES, FLAGSMITH_STARTUP_COMMANDS). - The task processor task definition starts via `start task-processor` and no longer migrates on every task; migrations run once per deploy via the migration task. startPeriod drops from 120s to 30s for the faster boot. flagsmith-common is temporarily sourced from its branch until the verbs are released; revert to the PyPI release before merge (see pyproject TODO). beep boop
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7901 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 1487 1487
Lines 58493 58493
=======================================
Hits 57687 57687
Misses 806 806 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise |
Visual Regression17 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7891.
Adopts the
flagsmithCLI entrypoint (from flagsmith-common) for container startup, replacing the bespoke sequencing inapi/scripts/run-docker.sh.run-docker.shis reduced to a backwards-compatible shim (exec flagsmith "$@"), so anything invoking the script path or its verbs keeps working.ENTRYPOINTis nowflagsmith;APPLICATION_LOGGERS(previously defaulted in the shell script) moves to a DockerfileENVso logging is unchanged.app/settings/common.pyfrom the databases actually configured.start task-processor.startPeriodraised to 120s in fix(infra): Task processor tasks killed during startup by health check #7887 is lowered to 30s in both the prod and staging task-processor definitions, which comfortably covers the new single-boot startup.How did you test this code?
End-to-end against a local environment, exercising each verb via the
flagsmithentrypoint:flagsmith migrate— waits for the DB, migrates the configured databases, creates the cache table.flagsmith serve— waits for the DB, starts the API;/health/livenessserved on:8000.flagsmith start task-processor— the new task-definition command; binds:8000and starts the worker threads.flagsmith migrate-and-serve— runs migrate, thenbootstrap(viaFLAGSMITH_STARTUP_COMMANDS), then serves.